Recently, short-range wireless communication such as Bluetooth or IrDA (Infrared Data Association) is generally used to control electric products. In the short-range wireless communication, only the communication between short distances can be done. Therefore, it is known that a terminal device executing the short-range wireless communication is connected to a device in a remote place by using a cell-phone (See Japanese Laid-Open Patent Publication No. 2008-278170).
There has been known a technique that a relay device obtains a BD_ADDR (Bluetooth Device Address) and a service code from each device executing Bluetooth communication and stores them, and a cell-phone inquires of the relay device an apparatus having a function that the cell-phone requires (See Japanese Laid-Open Patent Publication No. 2009-60163).
However, in a conventional communication system, a communication apparatus communicates with a device executing the short-range wireless communication at a short distance for example, and then the communication apparatus cannot communicate with the same device at a long distance. For example, the communication apparatus operates home electric appliances in a room by using the short-range wireless communication. Then, the communication apparatus cannot operate the home electric appliances away from home.